package dataObjects
{
	public class CardInstance
	{
		public var templateID:int;
		public var imageURL:String ;
		public var name:String ;
		public var multimedia:String ;
		public var value:int ;
		public var albumId:int;
		
		public var origin:CardTemplate;
		public var instanceID:int;
		
		public var alpha:Number;
		
		public function CardInstance(origin:CardTemplate,instanceID:int)
		{
			this.templateID = origin.templateID;
			this.imageURL = origin.imageURL;
			this.name = origin.name;
			this.multimedia = origin.multimedia;
			this.value = origin.value;
			
			this.origin = origin;
			this.instanceID=instanceID;
			this.albumId = origin.albumId;
			this.alpha = 1;
		}
		
		public function asTemplate():CardTemplate{
			return new CardTemplate(templateID,imageURL,name,multimedia,value,albumId);
		}
	}
}